package advanced.practice._1010;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        String[]names=new String[N];
        String[]pass=new String[N];
        for(int i=0;i<N;i++){
            names[i]=sc.next();
            pass[i]=sc.next();
        }
        StringBuilder builder=new StringBuilder();
        int count=0;
        for(int i=0;i<N;i++){
            String newPass=pass[i].replace("1","@").replace("0","%").replace("l","L").replace("O","o");
            if(newPass.endsWith(pass[i])){
                continue;
            }
            count++;
            builder.append(names[i]+" "+newPass+"\n");
        }
        if(count==0){
            System.out.printf("There %s %d account%sand no account is modified\n",N>1?"are":"is",N,N>1?"s ":" ");
        } else {
            System.out.println(count);
            System.out.println(builder.toString().trim());
        }
    }
}
